<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>我的好友</title>

    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link rel="stylesheet" href="bitStyle/skin/main.css">
    <script src="bitStyle/skin/jquery-1.10.2.min.js"></script>
    <script src="bitStyle/skin/layer.js"></script>
    <link rel="stylesheet" href="bitStyle/skin/layer.css" id="layui_layer_skinlayercss" style="">
    <script src="bitStyle/skin/foundation.js"></script>
    <script src="bitStyle/skin/my.js"></script>

    <script>
        $(function () {
            var flag=Number('1');
            // loadData(flag);

            $('.top-btn>li:eq(' + (flag-1) + ')').addClass('sel').siblings('li').removeClass('sel');

            $('.top-btn>li').on('click', '', function () {
                $(this).addClass('sel').siblings('li').removeClass('sel');
                window.location.href = '/home/rmq/friends/id/' + $(this).attr('param');
            });
        });

        function loadData(flag){
            console.log(flag);
            var i = layer.load(2);
            var param = {
                pageIndex: 1,
                pageSize:11,
                flag: flag
            };
            var url = '/Friends/MyFriendPageList';
            $("#friendContent").load(url, param, function (data) {
                if (!isReLogin(data, '')) {
                    layer.close(i);
                }
            });
        }
        function qrdk(s,comfir2){
            var param = {
                id:s,
                comfir2:comfir2
            };
            $.post("/Home/Rmq/qrdk" , param, function (result) {
                if (result.Code == 200) {
                    layer.msg(result.Message, function () {
                        window.location.href ='/home/rmq/friends/id/1';
                    });
                } else {
                    layer.msg(result.Message, function () {
                        window.location.href ='/home/rmq/friends/id/1';
                    });
                }
            });
        }
        function qrsk(s,comfir2){
            var param = {
                id:s,
                comfir2:comfir2
            };
            $.post("/Home/Rmq/qrsk", param, function (result) {
                if (result.Code == 200) {
                    layer.msg(result.Message, function () {
                        window.location.href ='/home/rmq/friends/id/2';
                    });
                } else {
                    layer.msg(result.Message, function () {
                        window.location.href ='/home/rmq/friends/id/2';
                    });
                }
            });
        }
    </script>
</head>
<body style="">


<div class="wrapper">
    <script>
    function back(){
        window.history.back();
    }
</script>
<style>
    .wrapper .mystyle{background-color:#6AA84F;text-align: center;font-weight: bold; color: #ffffff;
        padding: .4rem 3%; width: 94%; }
    .wrapper .mystyle img{float: left;  height: 100%; }
    .wrapper .notice,.article ,.joinfb,.w33,.my-friend001,.ljjcjj,.pt20,.swiper-container,.myforget,.myreg{margin-top: 1.8rem;}

    .weixin-set,.ewm{margin-top: 2.6rem;}
    .my-money001{margin-top: 2.2rem;}

</style>
<div class="header mystyle"><img onclick="back();" src="bitStyle/skin/back.png">人脉圈</div>

    <div class="top-btn w33">
        <!--<li param="0" class="sel"><a href="javascript:void(0)">全部</a></li>-->
        <li param="1" style="width: 50%"><a href="javascript:void(0)">主动</a></li>
        <li param="2" style="width: 50%"><a href="javascript:void(0)">被动</a></li>
    </div>
    <style>
        .friend-list{text-align: center;
            background-color: transparent;}
        .friend-list li{width: 80%; height:8rem;background-color: #ffffff;border: 1px solid #fff;border-radius: 5px; margin-bottom: 0.8rem;}
        .r_box,.l_box{ height: 6rem;display: inline-block;width: 50%;float: left;margin-bottom: .35rem;}
        .l_box{}

        .r_box{}
        .friend-list .l_box img{ height: 6rem; width: 100%;}
        .r_box div{height: 1rem;line-height: 1rem; float: none; text-align: left;margin-left:5%; }
        .r_box .title{font-size: .6rem; color: #000;  }
        .r_box .bo{border-bottom: 1px solid #bbbbbb;}
        .submit-f-btn{}
      .jbshuiyin{/*transform:rotate(15deg);
            -ms-transform:rotate(15deg);
            -moz-transform:rotate(15deg);
            -webkit-transform:rotate(15deg);
            -o-transform:rotate(15deg); */
            opacity:0.4;
            filter:Alpha(opacity=40); /* IE8 以及更早的浏览器 */
            position: relative;top:-6.25rem;right:-3.5rem;font-weight:bold;font-size: 1.2rem; color: red;
        }
    </style>

    <div class="my-friend my-friend001">
        <div class="back-eee"></div>
        <ul class="friend-list " id="friendContent">
            <li>
                        <div  class="l_box">
                            <img id="img_216"  src="/./Uploads/wechatSet/2019-01-09/5c35b78a4768a.png" onclick="showImgEwm(this)">
                        </div>
                        <div class="r_box">
                            <div class="title">加友编码</div>
                            <div class="bo">P45fbc6</div>

                            <div class="title">分配方式</div>
                            <div class="bo">主动</div>

                            <div class="title">微信绑定手机号</div>
                            <div class="bo">13115409166</div>
                          <div class="jbshuiyin">200</div>
                        </div>
                                                                            <input class=" submit-f-btn" type="submit" disabled value="等待对方确认"/>                                            </li><li>
                        <div  class="l_box">
                            <img id="img_205"  src="/./Uploads/wechatSet/2019-01-09/5c35b78a4768a.png" onclick="showImgEwm(this)">
                        </div>
                        <div class="r_box">
                            <div class="title">加友编码</div>
                            <div class="bo">Peae27d</div>

                            <div class="title">分配方式</div>
                            <div class="bo">主动</div>

                            <div class="title">微信绑定手机号</div>
                            <div class="bo">13115409166</div>
                          <div class="jbshuiyin">200</div>
                        </div>
                                                                            <input class=" submit-f-btn" type="submit" disabled value="等待对方确认"/>                                            </li>            


            <!--            <div class="no-data">暂无相关数据</div>-->


            <script src="/bitStyle/skin/pagination.js"></script>
            <script>
                $(function () {
                    var pageSize = '11';
                    var counts = '0';
                    var param = {flag:'0'};
                    var url = "/Friends/MyFriendPageList";
                    $.pagination.showMobile(pageSize, counts, url, param, false, "friendContent");

                });
            </script>
        </ul>
    </div>

    <script language="javascript">
        var timeOutEvent=0;
        $(function(){
            $(".t-share").on({
                touchstart: function(e){
                    timeOutEvent = setTimeout("longPress()",500);
                    e.preventDefault();
                },
                touchmove: function(){
                    clearTimeout(timeOutEvent);
                    timeOutEvent = 0;
                },
                touchend: function(){
                    clearTimeout(timeOutEvent);
                    if(timeOutEvent!=0){
                        // alert("你这是点击，不是长按"); 
                    }
                    return false;
                }
            })
        });
        function longPress(){
            timeOutEvent = 0;
            var src =$("#showimg").attr("src")
            var arr=src.split("t=");
            // console.log(arr[1])
            var x = 99999;
            var y = 10000;
            var rand = parseInt(Math.random() * (x - y + 1) + y);
            downloadIamge('#showimg',rand+'.jpg')
        }
        function downloadIamge(selector, name) {
            // 通过选择器获取img元素，  
            var img = document.querySelector(selector)
            // 将图片的src属性作为URL地址  
            var url = img.src
            var a = document.createElement('a')
            var event = new MouseEvent('click')

            a.download = name || '下载图片名称'
            a.href = url

            a.dispatchEvent(event)
        }
        function showImgEwm(v) {
            $("#showimg").attr("src",$(v).attr('src'));
            //$("#showBox").css("display","");
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                top:0,
                area: '100%',
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content: $('#showBox')
            });

        }
    </script>
    <style>
        .inshow{vertical-align: middle;}
        .inshow img{width: 100%; height: auto; vertical-align: middle}
    </style>
    <div class="inshow t-share" id="showBox" style="display: none">
        <img id="showimg" src="">
    </div>
    <script>
    $(function () {
        $('.footer>.f-icon:eq(2)').addClass('active').siblings('div').removeClass('active');
    });
</script>
<div class="footer">
    <div class="f-icon">
        <a href="/home/rmq/notice.html">
            <i class="f-iocn1"></i>
            <p>人脉公告</p>
        </a>
    </div>
    <div class="f-icon">
        <a href="/home/rmq/join.html">
            <i class="f-iocn2"></i>
            <p>添加人脉</p>
        </a>
    </div>
    <div class="f-icon">
        <a href="/home/rmq/friends/id/1.html">
            <i class="f-iocn3"></i>
            <p>我的人脉</p>
        </a>
    </div>
    <div class="f-icon active">
        <a href="/home/rmq/index.html">
            <i class="f-iocn4"></i>
            <p>账号管理</p>
        </a>
    </div>
</div>
</div>




</body></html>